package Factory;

import java.math.BigDecimal;


public class Divide implements Operation{
    @Override
    public String calculate(double num1, double num2) {
        if(num2 == 0)
            return "除数不能为零";
        else
            return new BigDecimal(num1).divide(new BigDecimal(num2)).toString();//返回除法运算结果
    }
}
